<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<body th:fragment="form(action,buttonName)">
        <form class="layui-form" th:object="${userForm}" th:action="${action}" method="post">
            <input type="hidden" th:name="${_csrf.parameterName}"
                th:value="${_csrf.token}" />
            <div class="layui-form-item">
                <label for="username" class="layui-form-label"> <span
                    class="x-red">*</span>登录名
                </label>
                <div class="layui-input-inline">
                    <input type="text" id="username" th:field="*{username}" required="" 
                    lay-verify="required" autocomplete="off" class="layui-input" />
                </div>
                <div class="layui-form-mid layui-word-aux">
                    <span class="x-red">*</span>将会成为您唯一的登入名
                </div>
            </div>
            <div class="layui-form-item">
                <label for="L_email" class="layui-form-label"> <span
                    class="x-red">*</span>邮箱
                </label>
                <div class="layui-input-inline">
                    <input type="text" id="L_email" th:field="*{email}" required=""
                        lay-verify="email" autocomplete="off" class="layui-input" />
                </div>
                <div class="layui-form-mid layui-word-aux">
                    <span class="x-red">*</span>
                </div>
            </div>
            <div class="layui-form-item">
                <label for="L_password" class="layui-form-label"> <span
                    class="x-red">*</span>密码
                </label>
                <div class="layui-input-inline">
                    <input type="password" id="L_pass" th:field="*{password}" required=""
                        lay-verify="password" autocomplete="off" class="layui-input" />
                </div>
                <div class="layui-form-mid layui-word-aux">6到16个字符</div>
            </div>
            <div class="layui-form-item">
                <label for="L_repass" class="layui-form-label"> <span
                    class="x-red">*</span>确认密码
                </label>
                <div class="layui-input-inline">
                    <input type="password" id="L_repass" name="confirm" required=""
                        lay-verify="confirm" autocomplete="off" class="layui-input" />
                </div>
            </div>
            <div class="layui-form-item">
                <label for="L_repass" class="layui-form-label"> </label>
                <button class="layui-btn" th:text="${buttonName}" lay-filter="submit" lay-submit="">
                    增加</button>
            </div>
        </form>
    <th:block th:include="common/script::script"></th:block>
</body>
</html>